<include file="public:headtop" />
<style>
    #content{
        margin:15px;
        background: #ffffed;
        padding:10px;
        border-radius: 10px;
    }
    #header .avatar{
       /* background-image: url("/static/weixin/images/index/circle.png");
        background-repeat: no-repeat;
        background-size: 100% 100%;*/
        margin:10px;
        border-radius: 100px;
        width:80px;
        height:80px;
        float:left;
        overflow:hidden;
        box-shadow: 0 0 8px rgb(255, 180, 0);
    }
    #header .name{
        float:left;
        font-size:14px;
        color:#999;
    }

    #content .bf img{
        width:100%;
        margin-top:10px;
    }

    #content .coupon{
        background-image: url("/static/weixin/images/index/valid_coupon.png");
        background-repeat: no-repeat;
        background-size: 100% 100%;
        width:100%;
        color:white;
        display:block;
    }
    #content .coupon-over{
        background-image: url("/static/weixin/images/index/invalid_coupon.png");
        background-repeat: no-repeat;
        background-size: 100% 100%;
        width:100%;
        color:white;
        display:block;
    }
    #content .coupon .title,#content .coupon-over .title{
        margin:30px 0;
        display:inline-block;
        font-size:18px;
        font-weight:bold;
        width:60%;
        text-align:center;
    } 
     #content .coupon .expire,#content .coupon-over .expire{
        margin-top:25px;
        display:inline-block;
        font-size:14px;
        font-weight:bold;
        width:38%;
        text-align:center;
    } 

</style>
<div id='content'>
    <header id='header'>
        <img class='avatar' src="{$user.avatar}" alt="" _src="{$user.avatar}">
        <div style="display:inline-block">
        <span class='name mt10 w100'>{$user.username}</span><br>
        <span class='name mt10'><a href="{:u('user/address')}">地址库管理</a></span>
        <span class='name mt10' style='margin-left:20px'><a href="{:u('user/calendar')}">早点日历</a></span>
        </div>
    </header>
    <div class='clear'>&nbsp;</div>
    <div class='bf'>
        <div style="float:left;width:100%;position:relative">
            <img style="float:left;width:49.8%;display:inline-block" _href='{:u('user/index',array('payman'=>'me','status'=>1))}' src="/static/weixin/images/index/wwfk.png" alt=""><img style="float:right;width:49.8%;display:inline-block" _href='{:u('user/index',array('payman'=>'ta','status'=>1))}' src="/static/weixin/images/index/twfk.png" alt="">
            <span style="color:white;font-weight:bold;font-size:14px;position:absolute;z-index:10;top:40%;left:36%">{$nopayforme}</span>
            <span style="color:white;font-weight:bold;font-size:14px;position:absolute;z-index:10;top:40%;left:86%">{$nopayforta}</span>
        </div>
        <!-- <img usemap="#nopay" style="width:100%;display:inline-block" src="/static/weixin/images/index/pay_button.png" alt="">
        <map name="nopay"> 
            <area shape="rect" coords="0,0,150,80" href="http://www.baidu.com" target="_blank" alt="" title=""> 
            <area shape="rect" coords="150,0,320,80" href="http://www.baidu.com" target="_blank" alt="" title=""> 
       </map> -->

        <img _href='{:u('user/index',array('type'=>'receive'))}' src="/static/weixin/images/index/receive_bf.png" alt="">
        <img _href='{:u('user/index',array('type'=>'send'))}' src="/static/weixin/images/index/send_bf.png" alt="">
    </div>
    <if condition="$coupons">
    <div>
        <img class='mt20' src="/static/weixin/images/index/coupon_title.png" alt="" style='width:100%'>
    </div>
    <ul class='mt10'>
        <volist name='coupons' id='item'>
        <li class='<php>if($item['expire_at']<=date('Y-m-d') || $item['use_at']>0){echo 'coupon-over';}else{echo 'coupon';}</php> mt10'>
                <span class='title'>{$item.title}</span>
                <span class='expire'>有效期至<br>{$item.expire_at}</span>
        </li>
        </volist>
    </ul>
    </if>
</div>
<include file="public:footer" />
<script>
    $(".bf img").live('click',function(){
        var href = $(this).attr('_href');
        window.location.href = href;
    })

    $(".avatar").attr("src",$(".avatar").attr('_src'));
</script>
</body>
</html>